import request from '@/utils/axios/request'

/**
 * 获取系统基础信息
 * @returns {*}
 */
export const getWebBasicInfo = () => {
    return request({
        url:'/user/view/getSysInfo',
        method:'get',
    })
}

/**
 * 文章列表
 * @returns {*}
 */
export const articleList = (params) => {
    return request({
        url:'/user/view/list',
        method:'post',
        data: params
    })
}


/**
 * 获取文章信息详情
 * @returns {*}
 */
export const getArticle = (id) => {
    return request({
        url:`/user/view/getArticle/${id}`,
        method:'get',
    })
}

/**
 * 获取留言信息
 * @returns {*}
 */
export const msgList = (articleId,ownership) => {
    return request({
        url:'/user/view/msgList',
        method:'get',
        params:{
            articleId,
            ownership
        }
    })
}

/**
 * 留言
 * @returns {*}
 */
export const addMessage = (params) => {
    return request({
        url:'/system/message/add',
        method:'post',
        data: params
    })
}


